From: kfraser@dhcp93.uk.xensource.com Date: Mon, 19 Jun 2006 16:26:54 +0000 (+0100) Subject: [XEN][PAE] Always enable non-debug version of l3tab_needs_shadow() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15921^2~27 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=7af0cf8927ab158daed39180f4783f1ed248d33e;p=xen.git [XEN][PAE] Always enable non-debug version of l3tab_needs_shadow() as there is some suspicion that it leads to crashes on PAE hosts. Also: improve bracketing in the macros, for safety. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 8eac137d4a..1d5ffdb44b 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -268,9 +268,9 @@ void share_xen_page_with_privileged_guests( #if defined(CONFIG_X86_PAE) -#ifdef NDEBUG +#if 1 /*def NDEBUG*/ /* KAF: Non-debug case is suspect: let's always use it. */ /* Only PDPTs above 4GB boundary need to be shadowed in low memory. */ -#define l3tab_needs_shadow(mfn) (mfn >= 0x100000) +#define l3tab_needs_shadow(mfn) ((mfn) >= 0x100000) #else /* * In debug builds we aggressively shadow PDPTs to exercise code paths. @@ -278,9 +278,9 @@ void share_xen_page_with_privileged_guests( * (detected by lack of an owning domain). Always shadow PDPTs above 4GB. */ #define l3tab_needs_shadow(mfn) \ - ((((mfn << PAGE_SHIFT) != __pa(idle_pg_table)) && \ + (((((mfn) << PAGE_SHIFT) != __pa(idle_pg_table)) && \ (page_get_owner(mfn_to_page(mfn)) != NULL)) || \ - (mfn >= 0x100000)) + ((mfn) >= 0x100000)) #endif static l1_pgentry_t *fix_pae_highmem_pl1e;